//
//  SFBattlefield.h
//  
//
//  Created by snowymydog on 08/06/2010.
//  Copyright LazyDog 2010. All rights reserved.
//

#import <UIKit/UIKit.h>
// #import "Texture2D.h"
@class LDSpriteLayer;
@class LDSprite;
@class LDText;
@class LDSoundController;

@interface SFBattlefield : NSObject {
	enum { brenda, candy, gipsy, penny, rose, yolander } invadersType;
	
	LDSoundController	*laserSnd;
	CGFloat gridX[5];
	CGFloat gridY[4];
	
	int				invaderOnBattlefield[60];
	BOOL			highlightTable[20];
	int				highlightCount;
	int				target01, target02;
	int				numberOfTotalInvaders;

	int				cursorX, cursorY;				// battlefield中的xy座標
	
	LDSpriteLayer	*battlefieldLayer;
	
	LDSpriteLayer	*invadersSeedLayer;
	
	LDSpriteLayer	*cursorLayer;
	LDSprite		*blinkingCursor01,
					*blinkingCursor02,
					*highlightCursor01,
					*highlightCursor02;

//	LDText			*scoreText;
	
//	BOOL			marching;	
}
// @property	int nowTile;
@property	int cursorX;
@property	int cursorY;
@property	int target01;
@property	int target02;

- (id) init;
- (void) setInvadersSprite : (LDSpriteLayer *) slayer;
- (void) setCursorSprite : (LDSpriteLayer *)slayer;
- (void) newLevel : (int) level;
- (void) attack : (CGPoint) xy;
- (void) handleHighlight : (int)pos : (int)x : (int)y;
//- (void) checkAttack;
- (BOOL) validAttack;
- (void) moveInvaders;
- (BOOL) isInvadersMarching;
- (BOOL) isSuccess;

@end
